package com.njts.method;

/**
 * @author David GE
 * Date  2025/11/14
 */
public class MethodReload {
    // 定义一个方法,用于输出学生的信息
    public static void main(String[] args) {
    getInfo("葛兆磊");
    getInfo("葛兆磊",30,155);
    String string = getInfo("张三");
    }
    //public static void getInfo(String name){
    //    System.out.println("该学生姓名:"+name);
    //}
    public static String  getInfo(String name){
        return  name;

    }
    public static void getInfo(String name,int age,double height){
        System.out.println("姓名:"+name);
        System.out.println("年龄:"+age);
        System.out.println("身高:"+height);
    }
    public static void getInfo(boolean gender){
        System.out.println("性别:"+gender);

    }
}
